﻿#pragma once
#include "hzpch.h"
#include <glm/glm.hpp>
#include "Hazel.h"

namespace Hazel
{
    // 前置声明 VertexArray
    class VertexArray;
    enum class RendererAPIType
    {
        None = 0,
        OpenGL = 1,
        Vulkan = 2,
        DirectX11 = 3
    };

    class RendererAPI
    {
    public:
        virtual ~RendererAPI() = default;

        virtual void Init() = 0;
        virtual void SetClearColor(const glm::vec4 &color) = 0;
        virtual void Clear() = 0;
        virtual void DrawIndexed(const Ref<VertexArray> &vertexArray) = 0;
        inline static RendererAPIType GetAPI() { return s_API; }
        static RendererAPI *Create();

    private:
        static RendererAPIType s_API;
    };

}